WIFI_RTL8192EU_SITE_METHOD = git
WIFI_RTL8192EU_SITE = https://github.com/mange/rtl8192eu-linux-driver
WIFI_RTL8192EU_SITE_BRANCH = realtek-4.4.x
WIFI_RTL8192EU_VERSION = a5ac6789a78a4f5ca0bf157a0f62385ea034cb9c
# $(shell git ls-remote $(WIFI_RTL8192EU_SITE) $(WIFI_RTL8192EU_SITE_BRANCH) | head -1 | cut -f1)

WIFI_RTL8192EU_LICENSE = GPL-2.0
WIFI_RTL8192EU_LICENSE_FILES = COPYING

WIFI_RTL8192EU_MODULE_MAKE_OPTS = \
	CONFIG_RTL8192EU=m

define WIFI_RTL8192EU_LINUX_CONFIG_FIXUPS
	$(call KCONFIG_ENABLE_OPT,CONFIG_WLAN)
	$(call KCONFIG_ENABLE_OPT,CONFIG_WIRELESS)
	$(call KCONFIG_ENABLE_OPT,CONFIG_WIRELESS_EXT)
	$(call KCONFIG_ENABLE_OPT,CONFIG_WEXT_CORE)
	$(call KCONFIG_ENABLE_OPT,CONFIG_WEXT_PROC)
	$(call KCONFIG_ENABLE_OPT,CONFIG_WEXT_PRIV)
	$(call KCONFIG_SET_OPT,CONFIG_CFG80211,y)
	$(call KCONFIG_SET_OPT,CONFIG_MAC80211,y)
	$(call KCONFIG_ENABLE_OPT,CONFIG_MAC80211_RC_MINSTREL)
	$(call KCONFIG_ENABLE_OPT,CONFIG_MAC80211_RC_MINSTREL_HT)
	$(call KCONFIG_ENABLE_OPT,CONFIG_MAC80211_RC_DEFAULT_MINSTREL)
	$(call KCONFIG_SET_OPT,CONFIG_MAC80211_RC_DEFAULT,"minstrel_ht")
endef

define WIFI_RTL8192EU_INSTALL_FIRMWARE
	$(INSTALL) -D -m 0644 $(WIFI_RTL8192EU_PKGDIR)/rtl8192her.bin \
		$(TARGET_DIR)/lib/firmware/rtlwifi/rtl8192her.bin
endef

# WIFI_RTL8192EU_POST_INSTALL_TARGET_HOOKS += WIFI_RTL8192EU_INSTALL_FIRMWARE

$(eval $(kernel-module))
$(eval $(generic-package))
